import request from '@/utils/request'
import qs from 'qs'

export function login(data) {
  return request({
    url: '/sms/user/login',
    method: 'post',
    data
  })
}

// get传参时，参数对应的key值是params
// post传参时，参数对应的key值是data
export function getInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
